PATHMac OS 8 Developer Documentation > Human Interface Toolbox > Menu Manager >

Mac OS 8.5 Menu Manager Reference


EnableMenuItem

Enables a menu item or a menu.

pascal void EnableMenuItem (
                     MenuHandle theMenu,
                     UInt16 item);
theMenu
A value of type MenuHandle . Pass a handle to the menu containing the item to be enabled.
item
An unsigned 16-bit integer. Pass a value specifying the item number of the menu item that you wish to enable. If you pass 0, EnableMenuItem enables the menu title and all items in the menu that were not previously individually disabled.

DISCUSSION

The EnableMenuItem function enables a menu item so that the user can choose the item from the menu. Unlike the pre-Mac OS 8.5 Menu Manager function EnableItem , the EnableMenuItem function can enable individual menu items with item numbers greater than 31. If the menu item has an associated icon, that icon is also enabled, unless the icon was previously individually disabled with the function DisableMenuItemIcon .

If your application enables a menu title using EnableMenuItem , it should then call either the DrawMenuBar function or the InvalMenuBar function to update the menu bar's appearance.


VERSION NOTES

Available with Mac OS 8.5 and later.


SEE ALSO

The function DisableMenuItem .

The function IsMenuItemEnabled .


© 1999 Apple Computer, Inc. — (Last Updated 19 Jan 99)